import request from '@/utils/request'

// 查询资产领用列表
export function listAssetReceive(query) {
  return request({
    url: '/module/AssetReceive/list',
    method: 'get',
    params: query
  })
}

// 查询资产领用详细
export function getAssetReceive(id) {
  return request({
    url: '/module/AssetReceive/' + id,
    method: 'get'
  })
}

// 新增资产领用
export function addAssetReceive(data) {
  return request({
    url: '/module/AssetReceive',
    method: 'post',
    data: data
  })
}

// 修改资产领用
export function updateAssetReceive(data) {
  return request({
    url: '/module/AssetReceive',
    method: 'put',
    data: data
  })
}

// 删除资产领用
export function delAssetReceive(id) {
  return request({
    url: '/module/AssetReceive/' + id,
    method: 'delete'
  })
}

// 修改归还状态
export function AssetIsReturn(data) {
  return request({
    url: '/module/AssetReceive/isReturn',
    method: 'PUT',
    data: data
  })
}

// 修改维修状态
export function updateIsRepair(data) {
  return request({
    url: '/module/AssetReceive/updateIsRepair',
    method: 'PUT',
    data: data
  })
}
